package com.fly.student.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class StudentDao {

	@Autowired
	JdbcTemplate baseDao;
	
	public List<Map<String, Object>> add() {
		List<Map<String, Object>> queryForList = baseDao.queryForList("select * from student");
		for (Map<String, Object> map : queryForList) {
			System.err.println(map.get("name"));
		}
		return queryForList;
	}
}
